<% layout('/layouts/default.html', {title: '考核任务信息表管理', libs: ['dataGrid']}){ %>
<style>
    .menu {
        padding: 2px;
        cursor: pointer;
        margin: 2px 1px 2px;
    }

    .options {
        position: absolute;
        display: none;
        width: 100px;
        height: 200px;
        background: #eee;
        /*overflow: auto;*/
    }

    .menu:hover .options {
        display: block;
    }
</style>
<div class="main-content">
    <div class="box box-main">
        <div class="box-header">
            <#form:form id="searchForm"  action="${ctx}/quota/dcSupExamSumQuotaInfo/quotaResultsAll" method="post" class="form-inline "
            data-page-no="${parameter.pageNo}" data-page-size="${parameter.pageSize}" data-order-by="${parameter.orderBy}">
            <div style="float: right">
                <div class="form-group">
                    <label class="control-label">${text('考核标题')}：</label>
                    <div class="control-inline width-160">
                        <#form:input path="titleExam" maxlength="100" class="form-control width-160" placeholder="请输入考核标题"/>
                    </div>
                </div>
                <div class="form-group">
                    <button type="submit" class="btn btn-primary btn-sm">${text('查询')}</button>
                    <button onclick="cz();" class="btn btn-default btn-sm">${text('重置')}</button>
                </div>
            </div>
        </#form:form>
    </div>
    <div class="box-body">
        <table id="dataGrid"></table>
        <div id="dataGridPage"></div>
    </div>
</div>
</div>
<% } %>
<script>
    //重置按钮
    function cz() {
        searchForm.reset();
        $('dataGrid').dataGrid('reloadGrid');
    }

    $('dataGrid').css('margin-bottom','230px')
    // 初始化DataGrid对象
    $('#dataGrid').dataGrid({
        searchForm: $("#searchForm"),
        columnModel: [
            {header:'${text("主键")}', name:'id', hidden:true},
            {header:'${text("考核标题")}', name:'titleExam', index:'a.exam_title', width:150, align:"left"},
            {header:'${text("考核年份")}', name:'examYear', index:'a.exam_year', width:100, align:"center"},
            {header:'${text("发布时间")}', name:'createDate', index:'a.create_date', width:100, align:"center"},
            {header:'${text("版本号")}', name:'versionNumber', index:'a.version_number', width:100, align:"center",hidden:true},
            {header:'${text("版本名称")}', name:'versionName', index:'a.version_name', width:100, align:"center",hidden:true},
            {
                header: '操作', name: 'testSelect', width: 100, title: false, align: "center",
                formatter: function (val, obj, row, act) {
                    var  actions=[];
                    actions.push('<a href="${ctx}/quota/dcSupExamSumQuotaInfo/quotaDetail2?examId='+row.id+"&examYear="+row.examYear+"&versionNumber="+row.versionNumber+'" class="btn btn-primary btn-xs btnList" title="${text("指标展示")}"><span>指标展示</span></a>&emsp;');
                    return actions.join('');
                }
            }
        ],
        // 加载成功后执行事件
        ajaxSuccess: function(data){
        }
    });


</script>
<style>

    .ui-jqgrid .ui-jqgrid-btable{
        margin-bottom: 170px;
    }
    .pp{
        display: flex;
        justify-content: center;
        align-items: center;
    }
    .dd{
        /*padding: 4% 15%;*/
        border: 1px solid #0079fe;
        color: #0079fe;
    }
    .options{
        width: 136.34px;
        /*display: block;*/
        height: 170px;
        background-color: white;
        box-shadow: 1px 14px 20px 2px #e8e8e8;
        /*top: 8.3%;*/
        right: 4.7%;
    }
    .options div{
        text-align: center;
        /*padding: 5px 5px;*/

    }
    .options div:hover{
        background-color: rgba(24, 144, 255,1);

    }

    .options div:hover a{
        color: #eeeeee;

    }

    .menu:hover .options{
        animation: anim .4s ;
    }

    @keyframes anim {
        0%{
            height: 0px;
        }
        100%{
            height: 170px;
        }
    }


</style>
